
module.exports = Behavior({
  properties: {
    height: {
      type: String,
      value: "500rpx",
      observer: "resizeBox"
    }
  },
  methods: {
    // 设置组件高度
    resizeBox(newVal) {
      const animation = wx.createAnimation({ duration: 200 })
      animation.height(newVal).step()
      this.setData({
        animationBox: animation.export()
      })
    },
  }
})